import { Custresources } from "@/api/api";
export default {
  name: 'companymand',
  components: {},
  props: [],
  data() {
    return {
      //接收数据
      ProductList: [],
      // listwrap:'',
      showsquire: false,
      number: 0,

    }
  },
  created() {
    this._dataList();
  },
  computed: {

  },
  mounted() {
    // console.log(this.$refs.bigimg,'234')
    this.init();
  },
  methods: {
    _dataList() {
      let params = {
        params: {}
      }
      Custresources(params).then(data => {
        this.ProductList = data.data.product_details;
        // console.log(this.ProductList)
        // console.log(data)

      });

    },
    init() {
      const self = this;
      // console.log(this.$refs.listwrap)
    },
    leftBtn() {
      this.number++;
      console.log($('.small-wrap-list'));
      var a = $('.small-wrap-list')[0].offsetLeft - this.number * 10;
      // $('.small-wrap')[0].offsetWidth =a ;
      $('.small-wrap-list')[0].offsetLeft = a;
      // console.log( $('.small-wrap').css('left',this.number*10) );
    },
    
    dataDetailout() {
      this.showsquire = false;

    },
    proimg(event) {
      $(this.$refs.leftimg).attr('src', $(event.currentTarget).attr('src'))
      $(this.$refs.rightimg).attr('src', $(event.currentTarget).attr('src'))
      console.log($('.small-wrap'));
    },
    dataDetails() {
      console.log(this.$refs.squire, 'a');
      console.log(this.$refs.squire[0].clientHeight, 'bb');
      // var x = e.clientX - $("#slider").width() / 2;
      // var y = e.clientY - $("#slider").height() / 2;
      console.log(this.$refs.bigimg);
    }
  }
}

